import request from '@/utils/request'

/**
 * @description: 卡片获取
 * @param {*} params params参数
 * @return {*} promise
 */
export const cardlistAPI = params => {
  return request.get('parking/card/list', { params: params })
}

/**
 * @description: 卡片添加
 * @param {*} data 参数
 * @return {*} promise
 */
export const addcarcardAPI = data => {
  return request.post('/parking/card', data)
}

// /parking/card/detail/{id}
/**
 * @description: 回显编辑月卡
 * @param {*} id 参数
 * @return {*} promise
 */
export const cardetailAPI = id => {
  return request.get(`/parking/card/detail/${id}`)
}

/**
 * @description: 编辑月卡
 * @param {*} data 参数
 * @return {*} promise
 */
export const editcarcardAPI = data => {
  return request.put('/parking/card/edit', data)
}

/**
 * @description: 删除月卡
 * @param {*} path 参数
 * @return {*} promise
 */
export const deletecarAPI = id => {
  return request.delete(`/parking/card/${id}`)
}
